phpDocumentor Web Commons
[ class tree: Web Commons ] [ index: Web Commons ] [ all elements ]

Class: Entity

Source Location: /model.php

Class Entity

Class Overview

Generic attribute container class.

Give an associative array to its constructor to define the existing fields.

Located in /model.php [line 15]



		
				Author(s):
		
Information Tags:
Since:  0.1

Methods

[ Top ]
Method Summary
Entity   __construct()  
void   fromArray()   Sets the value of attributes according to an associative array.
array   toArray()   Returns the attributes of this class in an associative array.
mixed   __get()   Returns the value of the attribute $attr.
void   __set()   Returns the value of the attribute $attr.

[ Top ]
Methods
Constructor __construct  [line 23]

  Entity __construct( $attrs  )

Parameters:
   $attrs: 

API Tags:
Access:  public


[ Top ]
fromArray  [line 71]

  void fromArray( array $array  )

Sets the value of attributes according to an associative array.

No attribute will be added or deleted. Attributes not present in the array will be set to Null.

Parameters:
array   $array: 

API Tags:
Access:  public


[ Top ]
toArray  [line 60]

  array toArray( )

Returns the attributes of this class in an associative array.


API Tags:
Access:  public

Information Tags:
Since:  0.1

[ Top ]
__get  [line 34]

  mixed __get( string $attr  )

Returns the value of the attribute $attr.

Parameters:
string   $attr: 

API Tags:
Access:  public

Information Tags:
Throws:  DomainException if $attr does not exist.
Since:  0.1

[ Top ]
__set  [line 48]

  void __set( string $attr, mixed $value  )

Returns the value of the attribute $attr.

Parameters:
string   $attr: 
mixed   $value: 

API Tags:
Access:  public

Information Tags:
Throws:  DomainException if $attr does not exist.
Since:  0.1

[ Top ]

Documentation generated on Fri, 16 Jul 2010 00:48:39 +0200 by phpDocumentor 1.4.3